package 异常的处理.test02;

import java.io.FileInputStream;
import java.io.FileNotFoundException;

public class ExceptionTest02 {
    public static void main(String[] args) {
        try{
            System.out.println(100/0);
        }catch(ArithmeticException a){
            System.out.println("算数异常了!!!!!");
        }
        System.out.println("main begin");
        try{
            m1();
        }catch(FileNotFoundException e){
            System.out.println("文件错误");
        }
        System.out.println("main over");
    }

    private static void m1() throws FileNotFoundException {
        System.out.println("m1 begin");
        m2();
        System.out.println("m1 over");
    }

    private static void m2() throws FileNotFoundException {
        System.out.println("m2 begin");
        m3();
        System.out.println("m2 over");
    }

    private static void m3() throws FileNotFoundException {
        System.out.println("m3 begin");
        new FileInputStream("D:\\我的世界\\.minecraft\\shaderpacks\\SEUS_PTGI_E11.zip");
        System.out.println("m3 over");
    }

}
